package cn.wx.openfeign;

import cn.wx.domain.Josnre;
import cn.wx.domain.Store;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class SentineOpenfeign implements FallbackFactory<StoreOpenFeign> {
    @Override
    public StoreOpenFeign create(Throwable throwable) {
        return new StoreOpenFeign() {
            @Override
            public Josnre add(Store store) {
                return new Josnre().setMsg("熔断了");
            }
        };
    }
}
